import java.util.ArrayList;

public class OperatorDeom1 implements Operator{



    @Override
    public void printmassage(ArrayList<Student> s) {

        for (int i = 0; i < s.size(); i++) {
            Student s1 =s.get(i);
            System.out.println(s1.toString());
        }




    }

    @Override
    public void printscore(ArrayList<Student> s) {

        double sum = 0;
        for (int i = 0; i < s.size(); i++) {
            Student s1 =s.get(i);
            sum += s1.getScore();
        }
        System.out.println("全部学生的平均分：" + (sum / s.size()));
    }
}
